﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Perceiveit.Xml.Tests.Serialized
{
    public class ComplexChild
    {

        [XmlAttribute("id")]
        public int ID
        {
            get;
            set;
        }

        private Perceiveit.Xml.Converters.DateTimeXConverter _dtConv = new Perceiveit.Xml.Converters.DateTimeXConverter();

        [XmlAttribute("datetime")]
        public string xDateTime
        {
            get { return _dtConv.ToString(this.Date); }
            set { this.Date = _dtConv.FromString(value); }
        }

        [XmlIgnore()]
        public DateTime Date
        {
            get;
            set;
        }

        [XmlAttribute("index")]
        public int Index
        {
            get;
            set;
        }

        [XmlElement("name")]
        public LocalString Name
        {
            get;
            set;
        }

        [XmlElement("desc")]
        public LocalString Description
        {
            get;
            set;
        }
    }
}
